<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" indent="yes"/>
    <xsl:template match="/">
        <xsl:if test="count(//category) = 0">Aucune catégorie</xsl:if>
        <xsl:for-each select="//category">

            <li class="product first" style="text-align:center; padding-right:20px; margin-bottom:5px;">

                <div style="width:250px; border:1px solid #E2E2E2; padding:10px;">

                    <table style="width:100%;">
                        <tr>
                            <td>
                                <a href="{concat('../user/ProductByCateg.do?id=', @id)}">
                                    <img src="{concat('../produits/categories/', @id,'.jpg')}" border="0" />
                                </a>
                                <div style="font-size:larger"><b>
                                <a href="{concat('../user/ProductByCateg.do?id=', @id)}">
                                    <xsl:value-of select="." />
                                </a>
                                </b>
                                </div>
                            </td>
                        </tr>
                    </table>

                    <div style="clear:both;"></div>
                </div>
            </li>

        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>